document.currentScript.attributes.fullresConfig = {"modifiedAt":"2025-01-13T23:18:48.351+00:00","adblockDetectionEnabled":false}; if(!window._fullres_loaded){window._fullres_loaded=true;var webVitals=function(e){"use strict";var n,t,r,i,o,a=-1,c=function(e){addEventListener("pageshow",(function(n){n.persisted&&(a=n.timeStamp,e(n))}),!0)},u=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},s=function(){var e=u();return e&&e.activationStart||0},f=function(e,n){var t=u(),r="navigate";a>=0?r="back-forward-cache":t&&(document.prerendering||s()>0?r="prerender":document.wasDiscarded?r="restore":t.type&&(r=t.type.replace(/_/g,"-")));return{name:e,value:void 0===n?-1:n,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},d=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){n(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},t||{})),r}}catch(e){}},l=function(e,n,t,r){var i,o;return function(a){n.value>=0&&(a||r)&&((o=n.value-(i||0))||void 0===i)&&(i=n.value,n.delta=o,n.rating=function(e,n){return e>n[1]?"poor":e>n[0]?"needs-improvement":"good"}(n.value,t),e(n))}},p=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},v=function(e){var n=function(n){"pagehide"!==n.type&&"hidden"!==document.visibilityState||e(n)};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},m=function(e){var n=!1;return function(t){n||(e(t),n=!0)}},h=-1,g=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},T=function(e){"hidden"===document.visibilityState&&h>-1&&(h="visibilitychange"===e.type?e.timeStamp:0,C())},y=function(){addEventListener("visibilitychange",T,!0),addEventListener("prerenderingchange",T,!0)},C=function(){removeEventListener("visibilitychange",T,!0),removeEventListener("prerenderingchange",T,!0)},E=function(){return h<0&&(h=g(),y(),c((function(){setTimeout((function(){h=g(),y()}),0)}))),{get firstHiddenTime(){return h}}},L=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},b=[1800,3e3],S=function(e,n){n=n||{},L((function(){var t,r=E(),i=f("FCP"),o=d("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTimer.value&&(r.value=i,r.entries=o,t())},u=d("layout-shift",a);u&&(t=l(e,r,w,n.reportAllChanges),v((function(){a(u.takeRecords()),t(!0)})),c((function(){i=0,r=f("CLS",0),t=l(e,r,w,n.reportAllChanges),p((function(){return t()}))})),setTimeout(t,0))})))},F={passive:!0,capture:!0},I=new Date,A=function(e,i){n||(n=i,t=e,r=new Date,k(removeEventListener),M())},M=function(){if(t>=0&&t1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,n){var t=function(){A(e,n),i()},r=function(){i()},i=function(){removeEventListener("pointerup",t,F),removeEventListener("pointercancel",r,F)};addEventListener("pointerup",t,F),addEventListener("pointercancel",r,F)}(n,e):A(n,e)}},k=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(n){return e(n,D,F)}))},B=[100,300],x=function(e,r){r=r||{},L((function(){var o,a=E(),u=f("FID"),s=function(e){e.startTimen.latency){if(t)t.entries.push(e),t.latency=Math.max(t.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};J[r.id]=r,G.push(r)}G.sort((function(e,n){return n.latency-e.latency})),G.splice(10).forEach((function(e){delete J[e.id]}))}},Q=function(e,n){n=n||{},L((function(){j();var t,r=f("INP"),i=function(e){e.forEach((function(e){(e.interactionId&&K(e),"first-input"===e.entryType)&&!G.some((function(n){return n.entries.some((function(n){return e.duration===n.duration&&e.startTime===n.startTime}))}))&&K(e)}));var n,i=(n=Math.min(G.length-1,Math.floor(z()/50)),G[n]);i&&i.latency!==r.value&&(r.value=i.latency,r.entries=i.entries,t())},o=d("event",i,{durationThreshold:n.durationThreshold||40});t=l(e,r,q,n.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),v((function(){i(o.takeRecords()),r.value<0&&z()>0&&(r.value=0,r.entries=[]),t(!0)})),c((function(){G=[],V=_(),r=f("INP"),t=l(e,r,q,n.reportAllChanges)})))}))},U=[2500,4e3],W={},X=function(e,n){n=n||{},L((function(){var t,r=E(),i=f("LCP"),o=function(e){var n=e[e.length-1];n&&n.startTimeperformance.now())return;t.value=Math.max(o-s(),0),t.entries=[i],r(!0),c((function(){t=f("TTFB",0),(r=l(e,t,Y,n.reportAllChanges))(!0)}))}}))};return e.CLSThresholds=w,e.FCPThresholds=b,e.FIDThresholds=B,e.INPThresholds=q,e.LCPThresholds=U,e.TTFBThresholds=Y,e.getCLS=P,e.getFCP=S,e.getFID=x,e.getINP=Q,e.getLCP=X,e.getTTFB=$,e.onCLS=P,e.onFCP=S,e.onFID=x,e.onINP=Q,e.onLCP=X,e.onTTFB=$,Object.defineProperty(e,"__esModule",{value:!0}),e}({});(function(){function getServedFromRoot(scriptAddress){return scriptAddress.substring(scriptAddress.indexOf("//")+2,scriptAddress.lastIndexOf("/"))}const currentScript=document.currentScript;const servedFrom=currentScript?getServedFromRoot(currentScript.src):null;const host=window.ALJS_OVERRIDE||servedFrom||"codepen.io/stats/fr";let referrer=document.referrer;window.fullres||={events:[]};function getParam(k){const params=new URLSearchParams(window.location.search);return params.get(k)}function getConfig(key){return(window._fullres_config||currentScript?.attributes?.fullresConfig||{})[key]}function pageHidden(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}function getMetadataKey(key){return(window.fullres.metadata||{})[key]}function mergeMetadata(newMeta={}){window.fullres.metadata=Object.assign({},window.fullres.metadata,newMeta)}const site=document.getElementById("Aljs")?document.getElementById("Aljs").getAttribute("data-site"):document.currentScript.attributes.siteKeyOverride||new URL(document.currentScript.src).pathname.replace(".js","").substring(1);const fullresOwner="aljs";function getPageViewId(){if(!window._fullres_page_view_id){window._fullres_page_view_id||=generateId();window._fullres_page_view_page=window.location.href;window._fullres_page_view_owner=fullresOwner}if(window._fullres_page_view_owner===fullresOwner&&window._fullres_page_view_page!==window.location.href){window._fullres_page_view_id=generateId();window._fullres_page_view_page=window.location.href}return window._fullres_page_view_id}function generateId(){return`${+new Date}-${Math.floor(Math.random()*268435455*1e8).toString(16).padStart(8,"0").slice(0,8)}`}const reqUrl="https://"+host+"/track/al";function reqBody(additional,additionalMeta={}){const data=Object.assign({},additional,{width:window.innerWidth,height:window.innerHeight,userAgent:navigator.userAgent,referrer:referrer,metadata:Object.assign({},additionalMeta,window.fullres.metadata||{}),utmSource:getParam("utm_source"),utmMedium:getParam("utm_medium"),utmCampaign:getParam("utm_campaign"),utmTerm:getParam("utm_term"),utmContent:getParam("utm_content"),site:site,url:window.location.toString(),clientPageViewId:getPageViewId(),fullresSettingsModifiedAt:getConfig("modifiedAt"),siteTagInstallUrl:currentScript?.src});return JSON.stringify(data)}function req(additional,additionalMeta={}){return fetch(reqUrl,{method:"post",mode:"no-cors",keepalive:true,body:reqBody(additional,additionalMeta)})}function checkIfUserIsBlockingAds(){if(!getConfig("adblockDetectionEnabled")||typeof getMetadataKey("hasAdblockerInstalled")!=="undefined"){return Promise.resolve()}return fetch("https://check-adblock.buysellads.net/i.gif",{mode:"no-cors"}).then((()=>mergeMetadata({hasAdblockerInstalled:false}))).catch((()=>mergeMetadata({hasAdblockerInstalled:true})))}function getScrollPercent(){var scrollTop=document.documentElement["scrollTop"]||document.body["scrollTop"];var docHeight=document.documentElement["scrollHeight"]||document.body["scrollHeight"];var winHeight=window.innerHeight;return scrollTop/(docHeight-winHeight)*100}function savePV(additionalMeta={}){return req({type:"pv"},additionalMeta)}function eventData(data){return{type:"event",eventKey:data.key}}function saveEvent(data){return req(eventData(data),data)}function setCookie(key,value,days){const date=new Date;date.setTime(date.getTime()+days*24*60*60*1e3);document.cookie=key+"="+value+";expires="+date.toUTCString()}function getCookieValue(key){const cookie=document.cookie.split(";").find((cookie=>cookie.indexOf(`${key}=`)>=0));return cookie?.split("=")?.at(1)}function checkDisableTracking(){const key="disableFullresTracking";const urlParamValue=new URL(window.location.href).searchParams.get(key);if(urlParamValue==="true"||urlParamValue==="false"){setCookie(key,urlParamValue,400)}mergeMetadata({isAdmin:getCookieValue(key)==="true"})}if(window.fullres.events&&window.fullres.events.length>0){for(var event of window.fullres.events){saveEvent(event)}}checkIfUserIsBlockingAds().then(checkDisableTracking).then((()=>{savePV();window.fullres.events={push:saveEvent};window.fullres.pages={push:savePV};referrer=window.location.href;(function(history){if(!history||history===undefined){return}var pushState=history.pushState;history.pushState=function(){pushState.apply(history,arguments);window.dispatchEvent(new Event("fullrespushstate"))}})(window.history);if(!window.fullres._PingInterval){window.fullres._PingInterval=setInterval((function(){if(!pageHidden()){req({type:"ping"})}}),30*1e3)}let vitals={};function saveVitals(){req({type:"vitals",vitals:vitals})}window.webVitals.onCLS((x=>vitals.cls=x));window.webVitals.onFID((x=>vitals.fid=x));window.webVitals.onLCP((x=>vitals.lcp=x));window.webVitals.onINP((x=>vitals.inp=x));window.webVitals.onFCP((x=>vitals.fcp=x));window.webVitals.onTTFB((x=>vitals.ttfb=x));window.addEventListener("visibilitychange",(()=>{if(document.visibilityState==="hidden"){saveVitals()}}));window.addEventListener("pagehide",saveVitals);window.addEventListener("fullrespushstate",(()=>{savePV();referrer=window.location.href}));window.addEventListener("popstate",(()=>{savePV();referrer=window.location.href}));const scrollThresholds={_fullres_oneHundredPercentScroll:99,_fullres_seventyFivePercentScroll:75,_fullres_fiftyPercentScroll:50,_fullres_twentyFivePercentScroll:25};const thresholdsTriggered={};window.addEventListener("scrollend",(()=>{const scrollPercent=getScrollPercent();const key=Object.keys(scrollThresholds).find((key=>scrollPercent>=scrollThresholds[key]));if(key&&!thresholdsTriggered[key]){thresholdsTriggered[key]=true;saveEvent({key:key})}}));const protocolSelector='a:not([href^="http://"]):not([href^="https://"]):not([href^="//"]).fullres-link';const domainSelectors=[window.location.host].map((domain=>`a[href*="${domain}"].fullres-link`)).join(", ");const links=document.querySelectorAll(`${protocolSelector}, ${domainSelectors}`);Array.from(links).forEach((link=>{link.addEventListener("click",(()=>{const data=eventData({key:"_fullres_clickedInternalLink"});return navigator.sendBeacon(reqUrl,reqBody(data))}))}))}))})()}